const git = require('../bin/lib/git');
const commitUtils = require('../bin/gitplus/lib/commit');
const lenFill = require('../bin/lib/printColumns/lib/lenFill.js');
async function run() {
    // let tags = await git.tags(['-l','*']);
    // console.log(tags);
    let resp = await git.listRemote(['--tags', 'origin']);
    // let resp = await git.raw(['show-ref','-s','my-tag-1']);
    // console.log(resp.replace(/(\r\n|\n|\r)/gm, ""));    
    // let resp = await commitUtils.getInfo('9ffbc59060c9b829e686337368c59976e4462db2');
    let tags = resp.split('\n').filter((t) => {
        return t;
    })
    tags = tags.map(t => {
        let data = t.split('\t');
        return { name: data[1], commitId: data[0] };
    })
    console.log(tags);
    // console.log(lenFill('hello,我时一个中国人,yes',50,'*'));
    // console.log(lenFill('hello,thissoun,yes',50,'*'));
}
run();
